package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Client;
import cn.wolfcode.crm.query.ClientQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClientMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Client record);

    Client selectByPrimaryKey(Long id);

    List<Client> selectAll();

    int updateByPrimaryKey(Client record);

    List<Client> queryForList(ClientQueryObject qo);

    int queryForCount(ClientQueryObject qo);

    void changeState(@Param("clientId") Long id,@Param("newState") int state);

    /**
     * @Description: 查询当前当前保单客户
     * @Param: [id] 传入当前保单id,来自于Mr.chen的创建
     * @return: java.util.List<cn.wolfcode.crm.domain.Client>
     */
    Client selectClientByBillId(Long id);

    void changeStateToVIP(Client client);
    /**
     * @Description: 投保结束之后改变当前客户的状态为正式客户
     * @Param: [client] 传入需要改变状态的客户
     * @return: void
     */

    //根据状态查所有正式正式客户信息
    List<Client> seletByState(long state);

}